package com.aiyige.page.authentication;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.aiyige.R;
import com.aiyige.arouter.config.ARouterConfig;
import com.aiyige.im.SessionHelper;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

@Route(path = ARouterConfig.WaitingAuthenticationPage)
public class WaitingAuthenticationPage extends AppCompatActivity {

    @BindView(R.id.titleBackBtn)
    ImageView titleBackBtn;
    @BindView(R.id.titleTv)
    TextView titleTv;
    @BindView(R.id.confirmBtn)
    Button confirmBtn;
    @BindView(R.id.contactCustomerServiceLayout)
    LinearLayout contactCustomerServiceLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.waiting_authentication_page);
        ButterKnife.bind(this);
        ARouter.getInstance().inject(this);
        titleTv.setText(R.string.user_authentication);
    }

    @OnClick({R.id.titleBackBtn, R.id.confirmBtn, R.id.contactCustomerServiceLayout})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.titleBackBtn:
                finish();
                break;
            case R.id.confirmBtn:
                finish();
                break;
            case R.id.contactCustomerServiceLayout:
                SessionHelper.getInstance().imService(this);
                break;
        }
    }
}
